Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for .NET Core 3.0 #182

Merged
merged 19 commits into from
Oct 11, 2019
Merged

Support for .NET Core 3.0 #182

merged 19 commits into from
Oct 11, 2019

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Aug 25, 2019

This PR switches to building with the .NET Core 3.0 SDK for the following benefits and changes:

  • Use Microsoft.NETFramework.ReferenceAssemblies to build on non-Windows platforms to remove the need for custom targets. This requires changing the minimum TFM to net461.
  • Add netstandard2.1 TFM.
  • Remove redundant MSBuildAllProjects MSBuild properties.
  • Removes all the if not .NET Framework 4.5.1 preprocessor directives.
  • Uses C# 8 language features where relevant.

@codecov
Copy link

codecov bot commented Aug 25, 2019

Codecov Report

Merging #182 into master will increase coverage by 0.88%.
The diff coverage is 93.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #182      +/-   ##
==========================================
+ Coverage   94.94%   95.83%   +0.88%     
==========================================
  Files          19       19              
  Lines         455      456       +1     
==========================================
+ Hits          432      437       +5     
+ Misses         23       19       -4
Impacted Files Coverage Δ
src/JustEat.StatsD/Buffered/BufferExtensions.cs 86.95% <ø> (-2.18%) ⬇️
src/JustEat.StatsD/ConnectedSocketPool.cs 87.8% <ø> (+12.19%) ⬆️
src/JustEat.StatsD/DisposableTimer.cs 100% <ø> (ø) ⬆️
src/JustEat.StatsD/Buffered/StatsDUtf8Formatter.cs 97.36% <ø> (-0.26%) ⬇️
...ustEat.StatsD/StatsDServiceCollectionExtensions.cs 100% <100%> (ø) ⬆️
src/JustEat.StatsD/SocketTransport.cs 90.9% <100%> (ø) ⬆️
src/JustEat.StatsD/SocketFactory.cs 100% <100%> (+12.5%) ⬆️
...tatsD/EndpointLookups/DnsLookupIpEndpointSource.cs 86.66% <100%> (ø) ⬆️
src/JustEat.StatsD/StatsDPublisher.cs 100% <100%> (ø) ⬆️
...Eat.StatsD/EndpointLookups/CachedEndpointSource.cs 100% <100%> (ø) ⬆️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e584296...d554462. Read the comment docs.

@martincostello
Copy link
Member Author

Some 2.2 vs 3.0 benchmarks, which basically show a modest improvement for UDP of ~4% but a ~14% improvement for IP.

.NET Core 2.2

BenchmarkDotNet=v0.11.5, OS=Windows 10.0.18362
Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=3.0.100-preview8-013656
  [Host]     : .NET Core 2.2.6 (CoreCLR 4.6.27817.03, CoreFX 4.6.27818.02), 64bit RyuJIT
  DefaultJob : .NET Core 2.2.6 (CoreCLR 4.6.27817.03, CoreFX 4.6.27818.02), 64bit RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
RunIp 45.953 us 0.8970 us 1.3698 us - - - -
RunIPWithSampling 3.635 us 0.0709 us 0.0817 us - - - -
RunUdp 55.505 us 1.1090 us 2.6355 us - - - -
RunUdpWithSampling 4.601 us 0.0933 us 0.1480 us - - - -

.NET Core 3.0 preview 8

BenchmarkDotNet=v0.11.5, OS=Windows 10.0.18362
Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=3.0.100-preview8-013656
  [Host]     : .NET Core 3.0.0-preview8-28405-07 (CoreCLR 4.700.19.37902, CoreFX 4.700.19.40503), 64bit RyuJIT
  DefaultJob : .NET Core 3.0.0-preview8-28405-07 (CoreCLR 4.700.19.37902, CoreFX 4.700.19.40503), 64bit RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
RunIp 39.976 us 0.7875 us 1.1293 us - - - -
RunIPWithSampling 3.389 us 0.0848 us 0.1133 us - - - -
RunUdp 53.369 us 1.1634 us 2.1851 us - - - -
RunUdpWithSampling 4.465 us 0.0872 us 0.1595 us - - - -

Ignore coverage.* files.
Bump version to 4.1.0 for change to target frameworks.
Use preview 8 of the .NET Core 3.0 SDK.
Swap net451 for net461.
Use Microsoft.NETFramework.ReferenceAssemblies to build on non-Windows platforms.
Remove redundant MSBuildAllProjects properties.
Revert back to a minimum version of System.Memory for net461 and netstandard2.0.
Make .NET Standard 2.0 and .NET 4.6.1 the exception, rather than the default.
Disable code analysis warning.
Use C# 8 features as suggested by Visual Studio, where approriate.
Fix warnings about disposable resources in the benchmarks.
Fix compilation of the benchmarks project on non-Windows platforms.
Drop TFM for StatsD benchmarks with .NET Core 2.0 as I don't think they're compiling properly on non-Windows platforms.
Fix the expression to ignore the benchmarks.
Enable nullable reference types.
Fix violations and add annotations.
Fix misreported nullable annotations.
Use Visual Studio 2019 in AppVeyor CI.
Update to preview 9 of .NET Core 3.0.
Use PackageIcon instead of PackageIconUrl as described by https://github.com/NuGet/Home/wiki/Packaging-Icon-within-the-nupkg.
Update to release candidate 1 of .NET Core 3.0.
@martincostello martincostello changed the title [WIP] Support for .NET Core 3.0 Support for .NET Core 3.0 Sep 23, 2019
Update to the final release of the .NET Core 3.0 SDK.
Use stable release of NuGet packages.
Use stable release of C#.
@martincostello martincostello merged commit 1555e8f into justeattakeaway:master Oct 11, 2019
@martincostello martincostello deleted the DotNet-Core-3 branch October 11, 2019 10:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants